#ifndef __InetAddress_H__
#define __InetAddress_H__

#include "my_header.h"
#include <string>
using std::string;

namespace wd
{


class InetAddress
{
public:
    InetAddress(unsigned short port, const string & ip = "127.0.0.1");
    InetAddress(struct sockaddr_in);

    string ip() const;
    unsigned short port() const;
    struct sockaddr_in * getInetAddressPtr() {  return &_addr;  }

private:
    struct sockaddr_in _addr;
};

}//end of namespace wd

#endif

